const modulesFiles = require.context('./modules', true, /\.js$/);
const stores = modulesFiles.keys().reduce((stores, modulePath) => {
  const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
  const value = modulesFiles(modulePath)
  stores[`${moduleName}Store`] = value.default
  return stores
}, {})

export default stores;
